#include <iostream>
#include "ProgressBar.hpp"
#include "CurlHandler.hpp"

int main()
{
    std::string url = "https://github.com/qinyuLT/CloudPan/blob/master/CloudPan1.0/test/mysql.cpp";
    int fileSize = -1;                   // 如果不知道文件大小，设置为 -1
    std::string outputDir = "downloads"; // 指定保存文件的目录

    ProgressBar progressBar(fileSize, "Downloading");
    CurlHandler curlHandler(url, &progressBar);

    curlHandler.perform(outputDir); // 调用 perform 方法并指定输出目录

    return 0;
}